import VueRouter from 'vue-router'
import Vue from 'vue'
import HomeContainer from './components/HomeContainer.vue'
import MemberContainer from './components/MemberContainer.vue'
import ShopcarContainer from './components/ShopcarContainer.vue'
import SearchContainer from './components/SearchContainer.vue'
import newList from './components/home/new.vue'
import share from './components/home/share.vue'
import buy from './components/home/buy.vue'
import feedback from './components/home/feedback.vue'
import video from './components/home/video.vue'
import relation from './components/home/relation.vue'
Vue.use(VueRouter)

// 3. 创建路由对象
var router = new VueRouter({
    routes: [
        { path: '/home', component: HomeContainer },
        { path: '/member', component: MemberContainer },
        { path: '/shopcar', component: ShopcarContainer },
        { path: '/search', component: SearchContainer },
        { path: '/home/new', component: newList },
        { path: '/home/share', component: share },
        { path: '/home/buy', component: buy },
        { path: '/home/feedback', component: feedback },
        { path: '/home/video', component: video },
        { path: '/home/relation', component: relation },
        { path: '/', redirect: '/home' }
    ],
    linkActiveClass: 'mui-active'
})

// 把路由对象暴露出去
export default router